{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "accelerator": "GPU",
    "colab": {
      "name": "image_ops.ipynb",
      "provenance": [],
      "collapsed_sections": [],
      "toc_visible": true
    },
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.6.3"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "GWEKvPCCxJke"
      },
      "source": [
        "##### Copyright 2020 The TensorFlow Authors."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "l-m8KQ-nxK5l",
        "colab": {}
      },
      "source": [
        "#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n",
        "# you may not use this file except in compliance with the License.\n",
        "# You may obtain a copy of the License at\n",
        "#\n",
        "# https://www.apache.org/licenses/LICENSE-2.0\n",
        "#\n",
        "# Unless required by applicable law or agreed to in writing, software\n",
        "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
        "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
        "# See the License for the specific language governing permissions and\n",
        "# limitations under the License."
      ],
      "execution_count": 0,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "O8FuVCLYxi_l"
      },
      "source": [
        "# TensorFlow Addons Image: Operations\n",
        "\n",
        "<table class=\"tfo-notebook-buttons\" align=\"left\">\n",
        "  <td>\n",
        "    <a target=\"_blank\" href=\"https://www.tensorflow.org/addons/tutorials/image_ops\"><img src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" />View on TensorFlow.org</a>\n",
        "  </td>\n",
        "  <td>\n",
        "    <a target=\"_blank\" href=\"https://colab.research.google.com/github/tensorflow/addons/blob/master/docs/tutorials/image_ops.ipynb\"><img src=\"https://www.tensorflow.org/images/colab_logo_32px.png\" />Run in Google Colab</a>\n",
        "  </td>\n",
        "  <td>\n",
        "    <a target=\"_blank\" href=\"https://github.com/tensorflow/addons/blob/master/docs/tutorials/image_ops.ipynb\"><img src=\"https://www.tensorflow.org/images/GitHub-Mark-32px.png\" />View source on GitHub</a>\n",
        "  </td>\n",
        "      <td>\n",
        "    <a href=\"https://storage.googleapis.com/tensorflow_docs/addons/docs/tutorials/image_ops.ipynb\"><img src=\"https://www.tensorflow.org/images/download_logo_32px.png\" />Download notebook</a>\n",
        "  </td>\n",
        "</table>"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "2a5ksOt-xsOl"
      },
      "source": [
        "## Overview\n",
        "This notebook will demonstrate how to use the some image operations in TensorFlow Addons.\n",
        "\n",
        "Here is the list of image operations we'll be covering in this example:\n",
        "\n",
        "- `tfa.image.mean_filter2d`\n",
        "\n",
        "- `tfa.image.rotate`\n",
        "\n",
        "- `tfa.image.transform`\n",
        "\n",
        "- `tfa.image.random_hsv_in_yiq`\n",
        "\n",
        "- `tfa.image.adjust_hsv_in_yiq`\n",
        "\n",
        "- `tfa.image.dense_image_warp`\n",
        "\n",
        "- `tfa.image.euclidean_dist_transform`"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "DMbjxr4PyMPF"
      },
      "source": [
        "# Setup"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "5hVIKCrhWh4a",
        "outputId": "365ae823-365c-4141-9d84-e4ccfb0c85c7",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 34
        }
      },
      "source": [
        "import tensorflow as tf\n",
        "import numpy as np\n",
        "import tensorflow_addons as tfa\n",
        "import matplotlib.pyplot as plt"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "TensorFlow 2.x selected.\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "Q6Z2rsP8yp2v"
      },
      "source": [
        "# Prepare and Inspect Images"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "9gbgJP10z9WO"
      },
      "source": [
        "## Download the images"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "IgUsVhBQ6dSg",
        "outputId": "20ecbebf-6ed9-4e59-f958-c94b2921ba74",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 52
        }
      },
      "source": [
        "img_path = tf.keras.utils.get_file('tensorflow.png','https://tensorflow.org/images/tf_logo.png')"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "stream",
          "text": [
            "Downloading data from https://tensorflow.org/images/tf_logo.png\n",
            "40960/39781 [==============================] - 0s 1us/step\n"
          ],
          "name": "stdout"
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "uheQOL-y0Fj3"
      },
      "source": [
        "## Inspect the images"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "MFGirRRZ0Y9k"
      },
      "source": [
        "### TensorFlow Icon"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "NRlvNQdm1YI8",
        "outputId": "1922ef25-a9f8-4fb4-8f60-65402a6fd969",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 281
        }
      },
      "source": [
        "img_raw = tf.io.read_file(img_path)\n",
        "img = tf.io.decode_image(img_raw)\n",
        "img = tf.image.convert_image_dtype(img, tf.float32)\n",
        "img = tf.image.resize(img, [500,500])\n",
        "\n",
        "plt.title(\"TensorFlow Logo with shape {}\".format(img.shape))\n",
        "_ = plt.imshow(img)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAARIAAAEICAYAAACTenveA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1D0ZJqn3vqxhPR6y5\nflXg+QEKcWfgA5KeAi4jdW/ObtFYm67ZieTPwIQ8Er4McAhwTZNj6sw1wKQ8PYk0DlErPzyfCdkB\nWFjoTgwISQLOBx6JiO8WqlouZkmjJY3K08uTxnIeISWUA7uItfYcDgRuya2rhouIEyNibESMJ+2X\nt0TEYa0Ya0to9iANsA/wGKmv/OUWiOdSYDbwBqkPfCSpr3sz8DhwE7B6Xlaks05PAA8AE5sQ7ztI\n3Zb7gXvz3z6tGDPwNuCeHOuDwH/m8o2Au4AZwJXAsrl8uTw/I9dv1KR94l3AtYMh1mb9+RJ5Myut\n2V0bMxsCnEjMrDQnEjMrzYnEzEpzIjGz0pxIzKw0JxIzK+3/AIUWUpOmeHMPAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "clXQrFVa2nN7"
      },
      "source": [
        "### Make a black and white version"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "tbaIkUCS2eNv",
        "outputId": "7e2796dd-26d9-4856-fa6e-7b5a084583c5",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 281
        }
      },
      "source": [
        "bw_img = 1.0 - tf.image.rgb_to_grayscale(img)\n",
        "\n",
        "plt.title(\"Mask image with shape {}\".format(bw_img.shape))\n",
        "_ = plt.imshow(bw_img[...,0], cmap='gray')"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQQAAAEICAYAAAC5yopxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAeJUlEQVR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FrS\nAcB3gesj4oPASuCstPxZwMo0//q0XGf7CjC/MF3NtbZfRFTsBnwMuLcw/XXg65WsKdUxDHimML0A\nGJjuDyS7kArgZ8CpTS1XwdrvAo6s9pqBbYEngDFkV/v1bPyeAO4FPpbu90zLqRNrHEwWpocBvwdU\nrbWW61bpQ4ZBwNLC9EtpXrXZNSJeSfdfBXZN96uq/tRN3ReYQZXWnLrgTwHLgfuAF4BVEbGhiXry\nWlP7aqB/Z9UK3AB8DWhI0/2p3lrLotKBUHMi+wiounO1krYHfgNcFBFrim3VVHNE1EfECLJP39HA\nhytcUpMkfQJYHhGzK11LZ6p0ILwMDClMD07zqs0ySQMB0s/laX5V1C9pK7IwuDUi7kyzq7rmiFgF\n3E/W7e4rqfS9mmI9ea2pfUfg9U4q8UDgBEmLgSlkhw3/UaW1lk2lA+FxYPc0crs1cApwd4Vrasrd\nwPh0fzzZcXpp/ulp5P4AYHWhm94pJAm4CZgfEf9eaKq6miUNkNQ33d+GbKxjPlkwfLqZWkvP4dPA\nn1Jvp8NFxNcjYnBEDCN7X/4pIk6rxlrLqtKDGMCxwHNkx5L/twrquR14BVhPdox4Ftmx4HTgeeCP\nQL+0rMjOkrwAzAVGVqDefyQ7HJgDPJVux1ZjzcA+wJOp1meAy9P83YCZwELgV0CvNL93ml6Y2ner\n0HviEOD3tVBre2++dNnMcpU+ZDCzKuJAMLOcA8HMcg4EM8s5EMws50Aws5wDwcxy/wM93kmhqFBV\nNgAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "UwqfpOm--vV2"
      },
      "source": [
        "# Play with tfa.image"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "jIa5HnomPds3"
      },
      "source": [
        "## Mean filtering\n",
        "Mean filtering is a filtering technique, which is often used to remove noise from an image or signal. The idea is to run through the image pixel by pixel and replacing it with the average values of neighboring pixels."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "SutWnbRoHl6i",
        "outputId": "52333d9d-788d-4c46-df94-f24456abb67f",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "mean = tfa.image.mean_filter2d(img, filter_shape=11)\n",
        "_ = plt.imshow(mean)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAeZUlEQVR4nO2dXWyk53Xff2e+ZzjD748lubteWVpp\noYvWdha2DPfCkGFAdo0oF04sN3CEQMDeOIADB0jkFmhaoBfxTZQYDdwKlRG5CKK6TgIJhgvDlWQE\nuYgjqXYUy9LKK1vSLsldkrv8nCHn8+nFeYYzXHHFITnDmeFzfsCL932feYdzSM7zf845z5c45zAM\nI1wi3TbAMIzuYiJgGIFjImAYgWMiYBiBYyJgGIFjImAYgdMRERCRh0TksohcEZHHO/EZhmG0B2n3\nOAERiQJvAp8GrgEvAV90zv28rR9kGEZb6IQn8FHginPul865EvAM8HAHPscwjDYQ68DPnAWuNt1f\nAz72fm8YHx93586d64AphmHUeeWVV5adcxO3l3dCBFpCRC4BlwDOnj3LSy+91C1TDCMIIpHIO3uW\nd+Cz5oAzTfenfdkunHNPOucuOucuTky8R5wMwzgmOiECLwHnReQuEUkAjwDPdeBzDMNoA20PB5xz\nFRH5PeAHQBT4lnPutXZ/jmEY7aEjOQHn3PeB73fiZxuG0V5sxKBhBI6JgGEEjomAYQSOiYBhBI6J\ngGEEjomAYQSOiYBhBI6JgGEEjomAYQS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eCiAjwFPC6c+5Pm17qOZtFZEJEhv11Gs1dvI6KwefvYGv9d/g88IL3ajqO\nc+5rzrnTzrlz6PfyBefcb/eirUem20kJ4LPAm2hs+B96wJ6/BhaAMhrzPYbGds8DvwD+LzDqnxW0\nd+Mt4F+Ai12w99+grv6rwE/98dletBn4V8BPvK0/A/6jL/8g8E/AFeB/A0lfnvL3V/zrH+zSd+KT\nwPf6wdbDHDZi0DACp9vhgGEYXcZEwDACx0TAMALHRMAwAsdEwDACx0TAMALHRMAwAsdEwDAC5/8D\n5aoQDDBya7UAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "Mp6cU7I0-r2h"
      },
      "source": [
        "## Rotate\n",
        "This operation rotates the given image by the angle (in radians) input by the user.  "
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "9kxUES9sM8Jl",
        "outputId": "1340b774-5fbd-4c94-ae26-a35fa3c50546",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "rotate = tfa.image.rotate(img, tf.constant(np.pi/8))\n",
        "_ = plt.imshow(rotate)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO2dfdAk1XWfn9+8y+6CgOVDG0TtUgYV\nGylUSgaxJUNQVVxgVYBIhkg4EcFoZSNtHKQSSI4MWInEhxWZCAssW1IJG6z1h7AcWRUwVkzIgp2y\nYyEWgZ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NqbZD/yqmZ0AnAJ8IHyHdbR5L3C6\nmf00cCJwpqRTgGuB683seGA3cFE4/yJgdyi/Ppw3bS4BHknt19nW8TCzmf0ApwJ3pPavAK6YpU3B\njmOB76b2HwWODttHE+c1AHwROD/vvBnafivwtrrbDBwEfAv4GeKEmxXZZwK4Azg1bK8I52mKNq4n\nFtDTgdsB1dXWSX5m3RxYBzyZ2t8RyurGUWb2dNh+BjgqbNfK/uCCngTcQ01tDu71A8BO4E7gceB5\nM9ufY0/b1nD8BeDIadkK3ALDqcoAAAGOSURBVAD8GhCF/SOpr61jM2sRmDsslvradalIOhj4c+BS\nM3sxfaxONpvZspmdSPyWfQvwxhmblIuktwM7zey+WdtSNbMWgaeAY1L760NZ3XhW0tEA4f+dobwW\n9ks6gFgA/sTMvhaKa22zmT0P3E3sUh8mKUlhT9vTtjUcXwM8NyUTTwN+XtL/Bf6UuEnw2zW1dSJm\nLQL3AhtCxHUl8G7gthnblMdtwKawvYm43Z2UvydE3E8BXki54FNB8Winm4BHzOwzqUO1s1nSWkmH\nhe0DiWMXjxCLwXl9bE1+h/OAu4JXUzlmdoWZrTezY4mfy7vM7II62joxsw5KAGcD3yduG36sBvbc\nAjwN7CNu811E3LbbCjwG/E/giHCuiHs3Hge+A2ycgb1vJXb1HwQeCD9n19Fm4E3A/cHW7wIfD+Wv\nB74JbAf+K7AqlK8O+9vD8dfP6Jn4WeD2ebB1nB/PGHSchjPr5oDjODPGRcBxGo6LgOM0HBcBx2k4\nLgKO03BcBByn4bgIOE7DcRFwnIbz/wEU6YHlJ93xtwAAAABJRU5ErkJggg==\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "WjMdSDKlBcPh"
      },
      "source": [
        "## Transform\n",
        "This operation transforms the given image on the basis of the transform vector given by the user. "
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "HTh1Qpps8Rg5",
        "outputId": "00dd3893-ffbe-4bdd-de3c-9f037651b36b",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "transform = tfa.image.transform(img, [1.0, 1.0, -250, 0.0, 1.0, 0.0, 0.0, 0.0])\n",
        "_ = plt.imshow(transform)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAeV0lEQVR4nO2dfdQkVX3nP996hgEM6AzDOMGZQXDB\nGI0vyIigZpPlxTNmXSEb3EWijOyE2RhGMbrqgKwLCALOKolJ1l0SXDFG8S0bOCwnhACemBxeHHTk\nbQQGgsvMGZ3hZUDAAPPUb/+o2/1U91PdXd1d3VXV/fuc88xTdau6751+qj59f/d3+7bMDMdxppeo\n7AY4jlMuLgHHmXJcAo4z5bgEHGfKcQk4zpTjEnCcKWckEpC0WtJ9krZK2jCKOhzHKQYVPU9A0gxw\nP3ACsA34PvAeM7u30IocxymEUfQEjgK2mtlDZvY8cBVw4gjqcRynABaM4DmXA4+k9rcBb+72AEk+\nbbFmHHnkkWU3wemTO+6441EzW9pePgoJ5ELSOmBdWfU7g+NTzeuJpJ9klY9CAtuBlan9FaGsBTO7\nHLg8NM6vqprgApg8RjEm8H3gcEmHSloInAJcM4J6nDHjAphMCu8JmNkeSeuB64EZ4Etmdk/R9Tjj\nxQUwuRSeIhyoER4OVJoqXCPO8Ei6w8xWtZf7jEGnKy6Ayccl4HTEBTAduAScTFwA04NLwJmHC2C6\ncAk4LbgApg+XgNPEBTCduAQcwAUwzbgEHBfAlOMSmHJcAI5LYIpxAT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nUocq1WdJSSYvC9r4kYxdbSGRwcoe2Nv4PJwM3hV7NyDGzs81shZkdQnJd3mRm\nv1vFtg5N2YMSwG8B95PEhp+sQHu+DuwAXiCJ+daSxHY3Ag8Afw8cEM4VSXbjQeAuYFUJ7X0bSVf/\nTmBz+PmtKrYZeB3ww9DWu4FPhfJXALcDW4FvAXuH8n3C/tZw/BUlXRO/CVxbh7YO8uMzBh1nyik7\nHHAcp2RcAo4z5bgEHGfKcQk4zpTjEnCcKccl4DhTjkvAcaYcl4DjTDn/H8uriv6cJG31AAAAAElF\nTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "O79BrK-bC8oh"
      },
      "source": [
        "## Random HSV in YIQ\n",
        "This operation changes color scale of a given RGB image to YIQ but here delta hue and saturation values are picked randomly from the given range."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "zZBI-9XvBSuh",
        "outputId": "452460e3-13ee-4eb7-ef4e-dd8a86c897eb",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "delta = 0.5\n",
        "lower_saturation = 0.1\n",
        "upper_saturation = 0.9\n",
        "lower_value = 0.2\n",
        "upper_value = 0.8\n",
        "rand_hsvinyiq = tfa.image.random_hsv_in_yiq(img, delta, lower_saturation, upper_saturation, lower_value, upper_value)\n",
        "_ = plt.imshow(rand_hsvinyiq)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZ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AASUVORK5C\nYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "ruyvVnmCDBgj"
      },
      "source": [
        "## Adjust HSV in YIQ\n",
        "This operation changes color scale of a given RGB image to YIQ but here instead of choosing randomly, delta hue and saturation values are inputs form the user."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "vbCdwGtYChnQ",
        "outputId": "430b5cf5-8a0a-497b-fa77-af6792bd5bf7",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "delta = 0.5\n",
        "saturation = 0.3\n",
        "value = 0.6\n",
        "adj_hsvinyiq = tfa.image.adjust_hsv_in_yiq(img, delta, saturation, value)\n",
        "_ = plt.imshow(adj_hsvinyiq)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAU3klEQVR4nO3da2xU553H8e8fY8DgcjEXB2xiEyAB\nSu6UQEMgmJCQyzZ5ka4SVVu0QqLSZqVUrdRNNtJKlfZF+6ZpK62qZTdV01XVy7aVkrLZTbk2SRto\nICThFhJzMcZcDASTQJoS4L8v5hkzGBOP7Zk5Z/z8PtLgc55zZvzHnvmd5znn+Bxzd0QkXoOSLkBE\nkqUQEImcQkAkcgoBkcgpBEQipxAQiVxRQsDMlpnZHjNrNrOnivE9RKQwrNDnCZhZBfAesBQ4BLwB\nPO7uuwr6jUSkIIrRE5gLNLv7Pnc/B/wCeLgI30dECmBwEV6zDmjNmT8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Og7Hgm6lN3SMXMqoHfAF93\n9w9zl6WpZne/4O63kNnKzgVmJFxSt8zsIaDd3bcmXUuxJR0CbcDknPn60JY2x8xsIkD42h7aU1G/\nmVWSCYCfuftvQ3Oqa3b3DmADmS71aDPLnsKeW09nrWH5KOBkiUq8E/iSmR0AfkFmSPCDlNbaL0mH\nwBvA9LDHdQjwGPBiwjV150VgeZheTmbcnW3/atjjPg84ndMFLwkzM+A5YLe7fy9nUepqNrPxZjY6\nTFeR2Xexm0wYPHqVWrP/h0eB9aFXU3Tu/rS717t7I5n35Xp3/0oaa+23pHdKAA8A75EZGz6Tgnp+\nDhwBPiUz5ltBZmy3DngfWAvUhHWNzNGNvcB2YE4C9S4g09V/B3grPB5IY83ATcC2UOsO4F9C+3XA\nn4Fm4L+BoaF9WJhvDsuvS+g9cTewuhxq7ctDZwyKRC7p4YCIJEwhIBI5hYBI5BQCIpFTCIhETiEg\nEjmFgEjkFAIikft/x2XfotEpnLcAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "fdbCDYJkG8Gv"
      },
      "source": [
        "## Dense Image Warp\n",
        "This operation is for non-linear warp of any image specified by the flow field of the offset vector (here used random values for example). "
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "dG557eQDDtSK",
        "outputId": "641b79fd-e23a-4bb5-d162-eb670b2b88d0",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "input_img = tf.image.convert_image_dtype(tf.expand_dims(img, 0), tf.dtypes.float32)\n",
        "\n",
        "flow_shape = [1, input_img.shape[1], input_img.shape[2], 2]\n",
        "init_flows = np.float32(np.random.normal(size=flow_shape) * 2.0)\n",
        "dense_img_warp = tfa.image.dense_image_warp(input_img, init_flows)\n",
        "dense_img_warp = tf.squeeze(dense_img_warp, 0)\n",
        "_ = plt.imshow(dense_img_warp)"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO2dd9weRbX4v+d5UxFIIyC/BAglgIAI\nkitN70WKBuQSVBRQilICFxAUgVAsQZRLIIC0Sy8B0aCIEhGNoVkRDEV6IARCQi8pJJQk757fHzO7\nO1uetyRvffZ8+Tw8u7OzM2ffPHP2zJkzM6KqGIZRXWrdLYBhGN2LKQHDqDimBAyj4pgSMIyKY0rA\nMCqOKQHDqDidogREZKyIzBKR2SJyamfUYRhGxyAdHScgIk3As8AewHzgX8CBqvpUh1ZkGEaH0BmW\nwKeA2ao6R1WXAVOBcZ1Qj2EYHUCfTihzBDAvOJ8PbN/SDWuttZaOGjWqE0QxDCPmoYceektVh+fT\nO0MJtAkRGQ+MB1h//fWZOXNmd4liGJVAROaWpXdGd+BlYL3gfKRPy6CqV6nqGFUdM3x4QTkZhtFF\ndIYS+BcwWkQ2FJF+wAHAtE6oxzCMDqDDuwOqukJEjgOmA03Adar6ZEfXYxhGx9ApPgFVvRO4szPK\nNgyjY7GIQcOoOKYEDKPimBIwjIpjSsAwKo4pAcOoOKYEDKPimBIwjIpjSsAwKo4pAcOoOKYEDKPi\nmBIwjIpjSsAwKo4pAcOoOKYEDKPimBIwjIpjSsAwKo4pAcOoOKYEDKPimBIwjIpjSsAwKo4pAcOo\nOKYEDKPimBIwjIpjSsAwKo4pAcOoOKYEDKPimBIwjIpjSsAwKo4pAcOoOKYEDKPimBIwjIpjSsAw\nKo4pAcOoOKYEDKPimBIwjIrTqhIQketE5A0ReSJIGyoiM0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\nTQDTgR39cR+fT7pQxpE4BborcAcgPVXWVfl0d3dgBDAvOJ/v03oa66jqq/74NWAdf9yj5Pcm6LbA\nA/RQmb15/SjwBjADeB5YqKorSuRJZPXXFwHDukpW4KfAKUDkz4fRc2VdabpbCfQ61Kn6HjekIiKr\nA78Gvq2qi8NrPUlmVW1W1W1wb9lPAZt3s0iliMjewBuq+lB3y9LZdLcSeBlYLzgf6dN6Gq+LyLoA\n/vsNn94j5BeRvjgFcLOq3uaTe7TMqroQuBdnUg8WkTiEPZQnkdVfHwS83UUi7gzsIyIvAlNxXYKL\neqisq0R3K4F/AaO9x7UfcAAwrZtlKmMacKg/PhTX747TD/Ee9x2ARYEJ3iWIiADXAk+r6gXBpR4n\ns4gMF5HB/nggznfxNE4Z7FdH1vgZ9gPu8VZNp6Oqp6nqSFUdhftd3qOqX++Jsq4y3e2UAPYCnsX1\nDc/oAfL8AngVWI7r8x2O69vdDTwH3AUM9XkFN7rxPPA4MKYb5P00ztR/DHjUf/bqiTIDWwOPeFmf\nAH7g0zcCHgRmA78C+vv0Af58tr++UTf9JnYB7ugNsq7MxyIGDaPidHd3wDCMbsaUgGFUHFMChlFx\nTAkYRsUxJWAYFceUgGFUHFMChlFxTAkYRsX5/08fr0WdP5khAAAAAElFTkSuQmCC\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "colab_type": "text",
        "id": "FcLMnSKYPcjA"
      },
      "source": [
        "## Euclidian Distance Transform\n",
        "This operation updates the pixel value with the euclidian distance from the foreground pixel to the background one.\n",
        "* Note : It takes only binary image and results in transformed image. If a different image is given it results in a image with single value"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab_type": "code",
        "id": "-OMh6oeRQaYQ",
        "outputId": "4f7e9aca-ed78-4e4d-8c06-6833ec899797",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 269
        }
      },
      "source": [
        "gray = tf.image.convert_image_dtype(bw_img,tf.uint8)\n",
        "# The op expects a batch of images, so add a batch dimension\n",
        "gray = tf.expand_dims(gray, 0)\n",
        "eucid = tfa.image.euclidean_dist_transform(gray)\n",
        "eucid = tf.squeeze(eucid, (0, -1))\n",
        "_ = plt.imshow(eucid, cmap='gray')"
      ],
      "execution_count": 0,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD8CAYAAAB3lxGOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0\ndHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAe6UlEQVR4nO2dXahk13Xnf6u+q271bbV7jBCSGDlY\nEPyQ2InwB56HYGOQPSHygydjExJlEOglAYcEEnkGZhiYh/gligPBTDMykYcQO+NksDADxpEdwjzE\nsWR7bMfCcTs4SEK2Plp967tOfex5qLO2dpVuq2/3ra/b5/+D4tbZ59y6697u/d9rrb323hZCQAhR\nXEq7NkAIsVskAkIUHImAEAVHIiBEwZEICFFwJAJCFJyNiICZ3W9mPzCzy2b2yCZ+hhBiPdi66wTM\nrAz8E/AB4DngG8DHQgjfX+sPEkKshU14Au8ELocQ/jmEkAGfAx7YwM8RQqyBygY+807g2eT6OeBd\nb/QNZqayRSE2z8shhDevNm5CBE6EmT0MPLyrny9EAfmX4xo3IQLPA3cn13flbUuEEC4Bl0CegBC7\nZBM5gW8A95rZW8ysBnwUeGIDP0cIsQbW7gmEEKZm9tvAl4Ey8JkQwj+u++cIIdbD2qcIb8oIhQNC\nbIOnQwj3rTaqYlCIgiMREKLgSASEKDgSASEKjkRAiIIjERCi4EgEhCg4EgEhCo5EQIiCIxEQouBI\nBIQoOBIBIQqORECIgiMREKLgSASEKDgSASEKjkRAiIIjERCi4EgEhCg4EgEhCo5EQIiCIxEQouBI\nBIQ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7tjk47FzH4ZeDGE8PSubdk0uxaB54G7k+u78rZ946dmdgdA/vXFvH0v7DezKgsB+PMQwl/n\nzXttcwjhKvA1Fi71bWbmJeypPdHW/P554JUtmfhe4FfM7MfA51iEBJ/aU1tPxa5F4BvAvXnGtQZ8\nFHhixzYdxxPAg/n7B1nE3d7+G3nG/d3AUeKCbwUzM+Ax4JkQwh8lt/bOZjN7s5ndlr9vsshdPMNC\nDD5yDVv9d/gI8NXcq9k4IYRPhBDuCiHcw+L/5VdDCL+2j7aeml0nJYAPAf/EIjb8T3tgz18ALwAT\nFjHfQyxiuyeBHwJ/A7wpf9ZYzG78CPgucN8O7P03LFz97wDfzl8f2kebgZ8DvpXb+j3gP+ftPwP8\nA3AZ+F9APW9v5NeX8/s/s6P/E78EfOks2HozL1UMClFwdh0OCCF2jERAiIIjERCi4EgEhCg4EgEh\nCo5EQIiCIxEQouBIBIQoOP8fIPbL/VrfJikAAAAASUVORK5CYII=\n",
            "text/plain": [
              "<Figure size 432x288 with 1 Axes>"
            ]
          },
          "metadata": {
            "tags": []
          }
        }
      ]
    }
  ]
}
